using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Expression;
namespace DailyReport.Core.Data.Dao
{
    public interface IGenericDao<T, ID>
    {
        ISession Session{set;}
        T GetById(ID id, bool shouldLock);
        List<T> GetAll();
        List<T> GetByExample(T exampleInstance, params string[] propertiesToExclude);
        List<T> GetByCriteria(params ICriterion[] criterion);
        T GetUniqueByExample(T exampleInstance, params string[] propertiesToExclude);
        ID SaveAndReturn(T entity);
        void Save(T entity);
        void SaveOrUpdate(T entity);
        void Delete(T entity);
        IList getBaseInstancesList(string sortExpression, int maxRows, int startRowIndex);
        int getBaseInstancesCount();
    }
}
